]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
dnd: Use StSettings instead of GtkSettings
authorCarlos Garnacho <carlosg@gnome.org>
Tue, 27 Nov 2018 13:42:43 +0000 (14:42 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Wed, 30 Jan 2019 22:18:53 +0000 (23:18 +0100)
Cut a middle man by listening to dconf settings directly, and stop relying
on XSettings for it.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/317

js/ui/dnd.js

index 07c19202a9448693cc9facd65a87fcdf4a785fcb..c5a1c0517533cab56b260116d7b61da7389500cc 100644 (file)
@@ -2,7 +2,6 @@
 
 const Clutter = imports.gi.Clutter;
 const GLib = imports.gi.GLib;
-const Gtk = imports.gi.Gtk;
 const St = imports.gi.St;
 const Meta = imports.gi.Meta;
 const Shell = imports.gi.Shell;
@@ -442,7 +441,7 @@ var _Draggable = class _Draggable {
         let [stageX, stageY] = event.get_coords();
 
         // See if the user has moved the mouse enough to trigger a drag
-        let threshold = Gtk.Settings.get_default().gtk_dnd_drag_threshold;
+        let threshold = St.Settings.get().drag_threshold;
         if (!currentDraggable &&
             (Math.abs(stageX - this._dragStartX) > threshold ||
              Math.abs(stageY - this._dragStartY) > threshold)) {